﻿@page "/ClientDetail/{id}"




@using CarlifeService;
@using ICarlifeService;

@using Models;
@inject NavigationManager NavigationManager
@inject IKeHuGuanXi services;
<h3>ClientDetail</h3>

<table class="table table-bordered" width="80%">
     <thead>
        @foreach (var item in client)
        {
            <tr style="border:1px solid;padding:3.5rem">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>渠道来源</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.ChannelSource</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>客户类型</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.TypeName</h5></td>
            </tr>
        }
     </thead>
   
</table>

<h1> 身份特征 </h1>

<table class="table table-bordered" style="" width="80%">
    <thead>
        @foreach (var item in client)
        {
            <tr style="border:1px solid;padding:100px">
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>客户名称</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.ClientName</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5> @item.Phone </h5></td>
            </tr>
        }
        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>性别</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Sex</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>身份证号码</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.IdNumber</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>婚姻状况</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Marriage</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>驾龄情况（年）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.DrivingAge</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>居住地址</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.ResidentialAddress</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>居住时间（年）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.LengthOfStay</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>工作单位</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Workplace</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>工作时间（年）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.workingHours</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>部门</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Department</h5></td>            
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>职位</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Posts</h5></td>
            </tr>
        }

    </thead>

</table>



    <h1> 社交关系 </h1>

    <table class="table table-bordered" style="" width="80%">
        <thead>
            @foreach (var item in client)
            {
                <tr style="border:1px solid;padding:100px">
                    <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>家庭成员</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5> @item.SContact </h5></td>
                </tr>
            }
            @foreach (var item in client)
            {
                <tr style="border:1px solid">
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>身份证号码</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Sidentitycard</h5></td>
                </tr>
            }

            @foreach (var item in client)
            {
                <tr style="border:1px solid">
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>月收入（元）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.MonthlyIncome</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>工作职务</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.JobTitle</h5></td>
                </tr>
            }

            @foreach (var item in client)
            {
                <tr style="border:1px solid">
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>子女情况</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Children</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>是否担保</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Guarantee</h5></td>
                </tr>
            }

            @foreach (var item in client)
            {
                 <tr style="border:1px solid">
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>非配偶紧急联系人</h4></td>
                    <td style="text-align:center;padding:35px"><h5>@item.Urgent</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                    <td style="text-align:center;padding:35px"><h5>@item.SContact </h5></td>
                </tr>
            }

            @foreach (var item in client)
            {
                <tr style="border:1px solid">
                    <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
                </tr>
            }

             @foreach (var item in client)
            {
                <tr style="border:1px solid">
                    <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
                </tr>
            }

             @foreach (var item in client)
            {
                <tr style="border:1px solid">
                    <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                    <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
                </tr>
            }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

        </thead>
    
        </table>


<h1> 履行能力 </h1>

<table class="table table-bordered" style="" width="80%">
    <thead>
        @foreach (var item in client)
        {
            <tr style="border:1px solid;padding:100px">
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>家庭其他收入（元）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.OtherIncome</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>房屋类型</h4></td>
                <td style="text-align:center;padding:35px"><h5> @item.TypeOfHouse </h5></td>
            </tr>
        }
        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>其他描述</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Description</h5></td>
              
            </tr>
        }

     

     

      

       

    </thead>

</table>





@code {
    [Parameter]
    public string id { get; set; }
    public int supId { get; set; }
    List<ClientDTO> client = new List<ClientDTO>();

    protected override async Task OnInitializedAsync()
    {
        client = services.ClientBackfill(Convert.ToInt32(id));
      
           await base.OnInitializedAsync();
      
    }
   


}

